![]() |
Kinetis SDK API Reference Manual
1.0.0-beta
Freescale Semiconductor, Inc.
|
#include <string.h>#include <stdbool.h>#include <assert.h>#include "fsl_device_registers.h"#include "fsl_sai_features.h"Functions | |
| void | sai_hal_init (uint8_t instance) |
| Initializes the SAI device. More... | |
| void | sai_hal_set_tx_bus (uint8_t instance, sai_bus_t bus_mode) |
| Sets the bus protocol relevant settings for Tx. More... | |
| void | sai_hal_set_rx_bus (uint8_t instance, sai_bus_t bus_mode) |
| Sets the bus protocol relevant settings for Rx. More... | |
| static void | sai_hal_set_mclk_source (uint8_t instance, sai_mclk_source_t source) |
| Sets the master clock source. More... | |
| void | sai_hal_set_mclk_divider (uint8_t instance, uint32_t mclk, uint32_t src_clk) |
| Sets the divider of the master clock. More... | |
| static void | sai_hal_set_tx_bclk_source (uint8_t instance, sai_bclk_source_t source) |
| Sets the bit clock source of Tx. More... | |
| static void | sai_hal_set_rx_bclk_source (uint8_t instance, sai_bclk_source_t source) |
| Sets the bit clock source of Rx. More... | |
| static void | sai_hal_set_tx_blck_divider (uint8_t instance, uint32_t divider) |
| Sets the bit clock divider value of Tx. More... | |
| static void | sai_hal_set_rx_blck_divider (uint8_t instance, uint32_t divider) |
| Sets the bit clock divider value of Tx. More... | |
| static void | sai_hal_set_tx_frame_size (uint8_t instance, uint8_t size) |
| Sets the frame size for Tx. More... | |
| static void | sai_hal_set_rx_frame_size (uint8_t instance, uint8_t size) |
| Set the frame size for rx. More... | |
| static void | sai_hal_set_tx_word_size (uint8_t instance, uint8_t bits) |
| Set the word size for tx. More... | |
| static void | sai_hal_set_rx_word_size (uint8_t instance, uint8_t bits) |
| Sets the word size for Rx. More... | |
| static void | sai_hal_set_tx_word_zero_size (uint8_t instance, uint8_t size) |
| Sets the size of the first word of the frame for Tx. More... | |
| static void | sai_hal_set_rx_word_zero_size (uint8_t instance, uint8_t size) |
| Sets the size of the first word of the frame for Rx. More... | |
| static void | sai_hal_set_tx_sync_width (uint8_t instance, uint8_t width) |
| Sets the sync width for Tx. More... | |
| static void | sai_hal_set_rx_sync_width (uint8_t instance, uint8_t width) |
| Sets the sync width for Rx. More... | |
| static void | sai_hal_set_tx_watermark (uint8_t instance, uint8_t watermark) |
| Sets the watermark value for Tx FIFO. More... | |
| static void | sai_hal_set_rx_watermark (uint8_t instance, uint8_t watermark) |
| Sets the watermark value for Rx FIFO. More... | |
| void | sai_hal_set_tx_master_slave (uint8_t instance, sai_master_slave_t master_slave_mode) |
| Sets the master or slave mode of Tx. More... | |
| void | sai_hal_set_rx_master_slave (uint8_t instance, sai_master_slave_t master_slave_mode) |
| Sets the Rx master or slave mode. More... | |
| void | sai_hal_set_tx_sync_mode (uint8_t instance, sai_sync_mode_t sync_mode) |
| Transmits the mode setting. More... | |
| void | sai_hal_set_rx_sync_mode (uint8_t instance, sai_sync_mode_t sync_mode) |
| Receives the mode setting. More... | |
| uint8_t | sai_hal_get_fifo_read_pointer (uint8_t instance, sai_io_mode_t io_mode, uint8_t fifo_channel) |
| Gets the FIFO read pointer. More... | |
| uint8_t | sai_hal_get_fifo_write_pointer (uint8_t instance, sai_io_mode_t io_mode, uint8_t fifo_channel) |
| Gets the FIFO read pointer. More... | |
| uint32_t * | sai_hal_get_fifo_address (uint8_t instance, sai_io_mode_t io_mode, uint8_t fifo_channel) |
| Gets the TDR/RDR register address. More... | |
| static void | sai_hal_enable_tx (uint8_t instance) |
| Enables the Tx transmit. More... | |
| static void | sai_hal_enable_rx (uint8_t instance) |
| Enables the Rx receive. More... | |
| static void | sai_hal_disable_tx (uint8_t instance) |
| Disables the Tx transmit. More... | |
| static void | sai_hal_disable_rx (uint8_t instance) |
| Disables the Rx receive. More... | |
| void | sai_hal_enable_tx_interrupt (uint8_t instance, sai_interrupt_request_t source) |
| Enables the Tx interrupt from different interrupt sources. More... | |
| void | sai_hal_enable_rx_interrupt (uint8_t instance, sai_interrupt_request_t source) |
| Enables the Rx interrupt from different sources. More... | |
| void | sai_hal_disable_tx_interrupt (uint8_t instance, sai_interrupt_request_t source) |
| Disables the Tx interrupts from different interrupt sources. More... | |
| void | sai_hal_disable_rx_interrupt (uint8_t instance, sai_interrupt_request_t source) |
| Disables Rx interrupts from different interrupt sources. More... | |
| void | sai_hal_enable_tx_dma (uint8_t instance, sai_dma_request_t request) |
| Enables the Tx DMA request from different sources. More... | |
| void | sai_hal_enable_rx_dma (uint8_t instance, sai_dma_request_t request) |
| Enables the Rx DMA request from different sources. More... | |
| void | sai_hal_disable_tx_dma (uint8_t instance, sai_dma_request_t request) |
| Disables the Tx DMA request from different sources. More... | |
| void | sai_hal_disable_rx_dma (uint8_t instance, sai_dma_request_t request) |
| Disables the Rx DMA request from different sources. More... | |
| void | sai_hal_clear_tx_state_flag (uint8_t instance, sai_state_flag_t flag) |
| Clears the Tx state flags. More... | |
| void | sai_hal_clear_rx_state_flag (uint8_t instance, sai_state_flag_t flag) |
| Clears the state flags for Rx. More... | |
| void | sai_hal_reset_tx (uint8_t instance, sai_reset_type_t mode) |
| Resets the Tx. More... | |
| void | sai_hal_reset_rx (uint8_t instance, sai_reset_type_t mode) |
| Resets the Rx. More... | |
| static void | sai_hal_set_tx_word_mask (uint8_t instance, uint32_t mask) |
| Sets the mask word of the frame in Tx. More... | |
| static void | sai_hal_set_rx_word_mask (uint8_t instance, uint32_t mask) |
| Sets the mask word of the frame in Rx. More... | |
| static void | sai_hal_set_tx_fifo_channel (uint8_t instance, uint8_t fifo_channel) |
| Sets the FIFO Tx channel. More... | |
| static void | sai_hal_set_rx_fifo_channel (uint8_t instance, uint8_t fifo_channel) |
| Sets the Rx FIFO channel. More... | |
| void | sai_hal_set_tx_mode (uint8_t instance, sai_mode_t mode) |
| Sets the running mode. More... | |
| void | sai_hal_set_rx_mode (uint8_t instance, sai_mode_t mode) |
| Sets the Rx running mode. More... | |
| void | sai_hal_set_tx_bclk_swap (uint8_t instance, bool ifswap) |
| Set Tx bit clock swap. More... | |
| void | sai_hal_set_rx_bclk_swap (uint8_t instance, bool ifswap) |
| Sets the Rx bit clock swap. More... | |
| static void | sai_hal_set_tx_word_start_index (uint8_t instance, uint8_t index) |
| Configures on which word the start of the word flag is set. More... | |
| static void | sai_hal_set_rx_word_start_index (uint8_t instance, uint8_t index) |
| Configures on which word the start of the word flag is set. More... | |
| static void | sai_hal_set_tx_fbt (uint8_t instance, uint8_t index) |
| Sets the index in FIFO for the first bit data . More... | |
| static void | sai_hal_set_rx_fbt (uint8_t instance, uint8_t index) |
| Sets the index in FIFO for the first bit data. More... | |
| bool | sai_hal_mclk_divider_is_update (uint8_t instance) |
| Flags whether the master clock divider is re-divided. More... | |
| bool | sai_hal_word_start_is_detected (uint8_t instance, sai_io_mode_t io_mode) |
| Word start is detected. More... | |
| bool | sai_hal_sync_error_is_detected (uint8_t instance, sai_io_mode_t io_mode) |
| Sync error is detected. More... | |
| bool | sai_hal_fifo_warning_is_detected (uint8_t instance, sai_io_mode_t io_mode) |
| FIFO warning is detected. More... | |
| bool | sai_hal_fifo_error_is_detected (uint8_t instance, sai_io_mode_t io_mode) |
| FIFO error is detected. More... | |
| bool | sai_hal_fifo_request_is_detected (uint8_t instance, sai_io_mode_t io_mode) |
| FIFO request is detected. More... | |
| static void | sai_hal_receive_data (uint8_t instance, uint8_t rx_channel, uint32_t *data) |
| Receives the data from FIFO. More... | |
| static void | sai_hal_transmit_data (uint8_t instance, uint8_t tx_channel, uint32_t data) |
| Transmits data to the FIFO. More... | |